Skip to content

DoIP Server POC implementation - #1

Draft
VinaykumarRS1995 wants to merge 22 commits into
eclipse-opensovd:mainfrom
VinaykumarRS1995:doip-server-poc
Draft

DoIP Server POC implementation#1
VinaykumarRS1995 wants to merge 22 commits into
eclipse-opensovd:mainfrom
VinaykumarRS1995:doip-server-poc

Conversation

@VinaykumarRS1995

Copy link
Copy Markdown

Summary

Checklist

  • I have tested my changes locally
  • I have added or updated documentation
  • I have linked related issues or discussions
  • I have added or updated tests

Related

Notes for Reviewers

@VinaykumarRS1995
VinaykumarRS1995 marked this pull request as draft January 23, 2026 07:54
@VinaykumarRS1995 VinaykumarRS1995 changed the title Add DoIP Server POC implementation DoIP Server POC implementation Jan 23, 2026
VinaykumarRS1995 and others added 22 commits May 28, 2026 15:14
Document DoIP server block diagram, supported message types,
and build instructions. Include PlantUML diagrams for startup,
TCP connection, UDP request, and graceful shutdown flows.

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Define crate as library and binary. Add tokio, serde, toml,
tracing, and thiserror dependencies. Declare top-level modules.

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Introduce ServerConfig for TCP, UDP, and ECU identity settings.
Provide InMemoryProvider for defaults and TomlProvider for
file-based configuration loading.

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Implement 8-byte header parsing with version validation. Define
TcpPayloadType and UdpPayloadType enums for all supported
message types (0x0001-0x8003) per ISO 13400-2.

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Introduce PayloadHandler<PayloadType, Request> trait for handler
implementations. Build Dispatcher with HashMap-based routing
from payload type to handler, generic over transport.

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Define SovdProxy trait with forward() for UDS byte translation.
StubProxy returns NRC 0x11 pending real backend integration.
MockProxy echoes input for unit testing.

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Add handlers for VehicleIdentification (0x0001-0x0003), VIN
request (0x0004), and EntityStatus (0x4001). Vehicle ID handlers
share common announcement-building logic.

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Add AliveCheck (0x0007) responding to keep-alive pings.
RoutingActivation (0x0005) returns 0x10 as placeholder
until full state-machine logic is implemented.

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Add DiagnosticsHandler (0x8001) forwarding UDS bytes via SovdProxy
and returning DiagnosticMessagePositiveAck. Wire all handlers into
build_tcp_dispatcher() and build_udp_dispatcher().

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Add TCP listener with per-connection task spawning. DoIP framer
reconstructs complete messages from partial reads. UDP uses
simple recv-parse-dispatch loop with no framing needed.

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Enforce max concurrent TCP connections using atomic counter.
SessionSlot acts as RAII guard that auto-releases on drop,
ensuring cleanup on disconnection or task cancellation.

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Add Server struct that starts both listeners concurrently
and coordinates graceful shutdown via cancellation token.

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Wire all layers in main(): load config, build dispatchers,
start transports, handle SIGINT shutdown. Include DoIP tester
for manual integration testing against a running server.

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
- Convert to Cargo workspace (lib + app + client)
- Narrow tokio features to specific set
- Refactor handlers to accept EcuConfig directly
- Tighten visibility (pub(super), pub(in crate::...))
- Remove DEFAULT_ prefix in defaults module
- Add compile_fail doc test for transport segregation
- Add TODO comments for future improvements
- Update README (headings, commands, abbreviations)
- Add sample-doip-server.toml
- Regenerate SVGs from updated puml sources
- Rename common.rs to utils.rs in vehicle identification handlers
- Rename InMemoryConfigProvider to DefaultConfigProvider
- Fix Toml_provider casing to toml_provider
- Move sample-doip-server.toml into app/
- Add ISO references, design decisions, and validation TODOs across codebase

Signed-off-by: VinaykumarRS1995 <Vinaykumarrs1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants